﻿using System;
using System.Linq;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace Superbaby.PrettyUI.Forms
{
    public partial class GScorllPanel : ContainerControl
    {
        private bool _autoScorll;
        private int _scorllMax;
        private int _scorllMin;
        private int _scorllValue;

        public GScorllPanel()
        {
            InitializeComponent();
        }

        protected override void OnPaint(PaintEventArgs pe)
        {
            base.OnPaint(pe);
            //if (this.ClientRectangle.Width > 0 && this.ClientRectangle.Height > 0)
            //{
            //    //double buffer to reduce blink
            //    using (Bitmap bitmap = new Bitmap(this.ClientRectangle.Width, this.ClientRectangle.Height))
            //    {
            //        using (Graphics buffer = Graphics.FromImage(bitmap))
            //        {
            //            buffer.Clear(this.BackColor);
            //            using (Pen pen = new Pen(this.BorderColor))
            //            {
            //                //buffer.DrawRectangle(pen, this.ClientRectangle);
            //            }

            //            pe.Graphics.DrawImage(bitmap, 0, 0);
            //        }
            //    }
            //}
        }

        public Color BorderColor
        {
            get;
            set;
        }

        //public override bool AutoScroll
        //{
        //    get
        //    {
        //        return _autoScorll;
        //    }
        //    set
        //    {
        //        _autoScorll = value;
        //    }
        //}

        protected override void OnPaintBackground(PaintEventArgs e)
        {
            //disable re-paint background to avoid blinking

            base.OnPaintBackground(e);
        }
    }
}
